#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include<stdio.h>

int main() {
    int fd = open("/dev/fb0", O_RDWR);
    if (fd < 0) {
        printf("open failed");
        return 1;
    }

    int fd2 = open("pht", O_RDWR);
   int ret=read(fd2,buf,sizeof(unsigned int));
    for(int i=0;i<800*480;i++)
   {
   unsigned int ret=read(fd2,buf,sizeof(unsigned int));
    write(fd, &ret, sizeof(ret)); // 写入一个颜色值
   }

    close(fd);

    return 0;
}
